home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
System Booster
/
System Booster.iso
/
Texteditors
/
PolyEd
/
Doc
/
ARexx.doc
next >
Wrap
Text File
|
1996-09-26
|
17KB
|
564 lines
PolyEd's ARexx commands
Copyright © 1994,95 Avalon UnLtd.
Written by Robert Brandner
All Rights Reserved
Like every good program, PolyEd provides an ARexx Port. This document
describes all ARexx commands, PolyEd supports. For details about
results, naming of ports etc. see the main guide (it's name depends
on your preferred language).
Sorry, this document is - at the moment - only available in english.
--------------------------------------------------------------------------
ACTIVATEWINDOW
,
ACTIVATEWINDOW activates the first window of the project.
--------------------------------------------------------------------------
BACKSPACE
SOW/S,SOL/S
BACKSPACE deletes the character left to the cursor. At the beginning
of a line, the EOL character of the previous line is deleted, and so
the previous and the current line are joined.
· SOW deletes to the start of the current word.
· SOL deletes to the start of the current line.
--------------------------------------------------------------------------
BLOCK
START/S,FORGET/S
BLOCK starts or forgets block selection.
· START starts block selection. Following cursor movements will
select the block. Then you may CUT, COPY or ERASE the block.
· FORGET forgets selection.
Inserting or deleting text, or any mouse actions by the user,
have the same effect as BLOCK FORGET, So you should "LOCKGUI", to
avoid unwanted actions by the user.
--------------------------------------------------------------------------
CHANGEWINDOW
LEFTEDGE/N,TOPEDGE/N,WIDTH/N,HEIGHT/N
CHANGEWINDOW changes the position and size of the first window of
the project.
--------------------------------------------------------------------------
CLOSE
FORCE/S
CLOSE closes the project and its window(s). If the project has been
modified, the modified project requester comes up, asking the user if
he wants to save the project first.
· FORCE suppresses the modified project requester.
--------------------------------------------------------------------------
COLUMN
DELTA/N/A
COLUMN accepts positive and negative values, to move the cursor left or
right relative to its current position.
--------------------------------------------------------------------------
COPY
,
COPY places a duplicate of the currently selected block into the
clipboard.
--------------------------------------------------------------------------
CURSOR
UP/S,DOWN/S,LEFT/S,RIGHT/S
CURSOR moves the cursor up, down, left or right a single line or
column position.
--------------------------------------------------------------------------
CUT
LINE/S,EOL/S
CUT removes the currently selected block from the project, and places
it in the clipboard.
· LINE cuts the current line (incl. EOL)
· EOL cuts from current cursor position to end of line (excl. EOL)
--------------------------------------------------------------------------
DELETE
EOW/S,EOL/S
DELETE removes the character right to the cursor.
· EOW deletes to the end of the current word.
· EOL deletes to the end of line. In contrary to CUT EOL, DELETE EOL
does not copy the deleted text to the clipboard.
--------------------------------------------------------------------------
ERASE
,
ERASE removes the selected block from the project.
--------------------------------------------------------------------------
FIND
PROMPT/S,NEXT/S,PREVIOUS/S,TEXT/F
FIND searches for text that matches the specified text.
· PROMPT opens the Find requester, but does not search.
· NEXT searches for the next occurence of findstring.
· PREVIOUS searches for the previous occurence of findstring.
· TEXT sets findstring to specified text.
'FIND NEXT' finds the next occurence of whatever findstring is.
'FIND foobar' sets findstring to 'foobar' but does not search.
'FIND NEXT foobar' sets findstring to 'foobar' and searches.
'FIND PROMPT' opens the Find requester.
--------------------------------------------------------------------------
FINDCHANGE
FINDCHANGE PROMPT/S,FIND/K,CHANGE/K,ALL/S
Searches for text and replaces it by another text. This is done like
replace from the menu, i. e. if the selected block matches findstring
it is replaced by changestring, else nothing is done. Then the next
occurence of findstring is selected.
· PROMPT opens the Find & Change requester, but does not search.
· FIND sets findstring to specified text.
· CHANGE sets changestring to specified text.
· ALL searches and changes from current cursor position to end
of text.
'FINDCHANGE FIND foobar CHANGE hello' sets findstring to 'foobar',
changestring to 'hello' and does a find & replace.
'FINDCHANGE' does a find & replace with current findstring
and changestring.
--------------------------------------------------------------------------
FINDNEXT
,
FINDNEXT finds the next occurence of findstring.
--------------------------------------------------------------------------
FINDPREVIOUS
,
FINDPREVIOUS finds the previous occurence of findstring.
--------------------------------------------------------------------------
GETATTR
OBJECT/A,NAME/N,FIELD
GETATTR obtains information about the attributes of an object.
· OBJECT specifies the object type to obtain information on.
· NAME specifies the handle of the object.
Use only values obtained by previous calls to GETATTR.
· FIELD specifies which field should be checked for information.
In the above OBJECT you may seek information an the attributes of
any of the following items:
· APPLICATION
· PROJECTS
· PROJECT <name>
· MACROS
· MACRO <name>
· WINDOWS
· WINDOW <name>
If the destination variable is a stem variable, the following fields
are available:
APPLICATION consists of the following nodes (an aspect of APPLICATION
you can seek sub-information about):
· VERSION version and Copyright information
· SCREEN name of the public screen, PolyEd resides in
· CURRENTWINDOW title of currently active text window
· CURRENTPROJECT name of the current project
· AREXX name of PolyEd's ARexx port
· VAR_BLOCKSTARTLINE these four nodes ...
· VAR_BLOCKSTARTCOL ... contain the beginning ...
· VAR_BLOCKENDLINE ... and end of ...
· VAR_BLOCKENDCOL ... the selected block.
· VAR_FINDSTRING findstring FIND, FINDCHANGE, FINDNEXT and FINDPREVIOUS look for
· VAR_CHANGESTRING changestring, FINDCHANGE uses
· FLAG_IGNORECASE status of 'Ignore Case?'
· FLAG_WHOLEWORDS status of 'Whole Words?'
· VAR_ARRANGEMODE current window arrange style
( 0=stacked, 1=vertical, 2=horizontal, 3=full size )
· FLAG_LEARNING status of 'Learn macro'
· VAR_RIGHTBORDER 'Right Border' value (from settings)
· VAR_TABWIDTH 'Tab Width' value (from settings)
· FLAG_OVERWRITE status of 'Overwrite?'
· FLAG_AUTOINDENT status of 'Auto indent?'
· FLAG_TABISSPACES status of 'TAB is spaces?'
· FLAG_WORDWRAP status of 'Word Wrap?'
· FLAG_CREATEICONS status of 'Create icons?'
· VAR_AUTOSAVE value of 'Auto Save' (from settings)
· VAR_BACKUPS value of 'Backups' (from settings)
PROJECTS.COUNT contains the number of projects; PROJECTS.0 through
PROJECTS.<PROJECTS.COUNT-1> contain the name of the project.
PROJECT consists of the following nodes:
· FILENAME the complete filename of the project
· PATH the path portion of the filename
· FILE the file portion of the filename
· LINES the number of lines of the project
· CHANGES the number of changes made to the
project (since last save).
· FLAG_HIDDEN 1=project is currently hidden, 0=project is visible
MACROS.COUNT contains the number of macros; MACROS.0 through
MACROS.<MACROS.COUNT-1> contain the name of the macro.
MACRO consists of the following nodes:
· FILENAME the complete filename of the macro
· PATH the path portion of the filename
· FILE the file portion of the filename
· HOTKEY the macros hotkey (as a string)
WINDOWS.COUNT contains the number of windows; WINDOWS.0 through
WINDOWS.<WINDOWS.COUNT-1> contain the title of the window.
WINDOW consists of the following nodes:
· PROJECT name of the project, the window belongs to
· LEFT left edge
· TOP top edge
· WIDTH width
· HEIGHT height
· TITLE title of the window
See the demo program 'getattr.ped' for how to use this complex command.
--------------------------------------------------------------------------
GETCHAR
,
GETCHAR returns the character right to (or under) the cursor.
--------------------------------------------------------------------------
GETCURSORPOS
,
GETCURSORPOS returns the position of the cursor. The following nodes
are returned when using a stem variable:
· LINE Contains the line, the cursor is in.
· COLUMN Contains the column the cursor is in.
--------------------------------------------------------------------------
GETLINE
,
GETLINE returns the contents of the line, under the cursor.
--------------------------------------------------------------------------
GETWORD
,
GETWORD returns the word under the cursor.
--------------------------------------------------------------------------
GOTOAUTOMARK
,
GOTOAUTOMARK moves to the cursor to the position where the last
change was made to the project.
--------------------------------------------------------------------------
GOTOCOLUMN
COLUMN/N/A
GOTOCOLUMN moves the cursor to the specified position.
--------------------------------------------------------------------------
GOTOLINE
LINE/N/A
GOTOLINE moves the cursor to the specified line.
--------------------------------------------------------------------------
LEARN
FILE/K,STOP/S
LEARN allows PolyEd to build an ARexx macro consisting of the
actions the user performs.
· FILE specifies where the macro is to be saved.
· STOP tells PolyEd to stop learning.
--------------------------------------------------------------------------
LINE
DELTA/N/K
LINE accepts positive or negative arguemtns to move the cursor up or
down relative to its current position.
--------------------------------------------------------------------------
LOCKGUI
,
LOCKGUI inhibits the graphical user interface of PolyEd.
--------------------------------------------------------------------------
MOVEWINDOW
LEFTEDGE/N,TOPEDGE/N
MOVEWINDOW is used to change the position of the first window of the
project. A value of -1 means no change or don't care.
--------------------------------------------------------------------------
NEW
,
NEW creates a new project.
--------------------------------------------------------------------------
OPEN
FILENAME/K
OPEN opens the specified text into a new project (if there is an
unmodified new project around it will be opened into that).
· FILENAME specifies the file to be opened.
--------------------------------------------------------------------------
PASTE
,
PASTE puts the contents of the clipboard into the project - at the
cursor position.
--------------------------------------------------------------------------
POSITION
SOF/S,EOF/S,SOL/S,EOL/S,SOW/S,EOW/S,SOV/S,EOV/S
POSITION moves the cursor to the position specified by the argument:
· SOF moves it to the beginning of the file.
· EOF moves it to the end of the file.
· SOL moves it to the beginning of the current line.
· EOL moves it to the end of the current line.
· SOW moves it to the start of the current word.
· EOW moves it to the end of the current word.
· SOV moves it to the top of the current view.
· EOV moves it to the end of the current view.
--------------------------------------------------------------------------
PRINT
FILENAME/K
PRINT prints the contents of the current project. If FILENAME is
set, the text is print to the specified file instead of the printer.
· FILENAME specifies a file where the text shall be printed to.
--------------------------------------------------------------------------
QUIT
FORCE/S
QUIT ends PolyEd. For every modified project a modified project
requester comes up.
· FORCE suppresses the modified project requesters.
--------------------------------------------------------------------------
REDO
,
REDO allows you to undo the "UNDO" command.
--------------------------------------------------------------------------
SAVE
,
SAVE saves the current project to its current filename. If the
project is unnamed, a file requester comes up, asking the user for a
name for the project.
--------------------------------------------------------------------------
SAVEAS
NAME/K
This command saves the current project to the specified filename. If
no name is specified, a file requester comes up, asking the user for
a filename for the project.
· NAME specifies the name to that the project should be saved. The
name should be placed in quotes.
--------------------------------------------------------------------------
SETATTR
OBJECT/A,NAME,FIELD,NEWVALUE
SETATTR manipulates the aspects of an object.
· OBJECT specifies the object type to manipulate.
· NAME specifies the handle of the object.
· FIELD specifies which field should be modified.
· NEWVALUE specifies the new value for that field. Watch out; some
fields require numeric values, some require strings.
In the above OBJECT you may set attributes of any of the following items:
· APPLICATION
· PROJECT <name>
Valid values for FLAG_xxx fields are 0 and 1, where
0 means no/off/false and 1 means yes/on/true.
All modifications are immediately made visible to the user.
If OBJECT is APPLICATION the following fields may be manipulated:
· VAR_FINDSTRING findstring for FIND, FINDCHANGE,
FINDNEXT and FINDPREVIOUS
· VAR_CHANGESTRING changestring for FINDCHANGE
· FLAG_IGNORECASE status of 'Ignore Case?'.
· FLAG_WHOLEWORDS status of 'Whole Words?'.
· VAR_ARRANGEMODE status of window arrange style
( 0=stacked, 1=vertical, 2=horizontal, 3=full size )
· VAR_RIGHTBORDER right border value
· VAR_TABWIDTH Tab width value
· FLAG_OVERWRITE status of 'Overwrite?'.
· FLAG_AUTOINDENT status of 'Auto indent?'.
· FLAG_TABISSPACES status of 'TAB is spaces?'.
· FLAG_WORDWRAP status of 'Wordwrap?'
· FLAG_CREATEICONS status of 'Create icons?'.
If OBJECT is PROJECT the following fields may be manipulated:
· FLAG_HIDDEN 0=Reveal project, 1=Hide project
Examples:
'SETATTR APPLICATION FIELD VAR_TABWIDTH NEWVALUE 6' sets the Tab Width to 6.
'SETATTR APPLICATION FIELD FLAG_WORDWRAP NEWVALUE 1' activates Wordwrap.
'SETATTR APPLICATION FIELD VAR_FINDSTRING NEWVALUE foobar' lets further searches
look for foobar.
'SETATTR APPLICATION FIELD CURRENTPROJECT NEWVALUE foobar' makes the project
named foobar the current one.
'SETATTR PROJECT foobar FLAG_HIDDEN 1' hides project foobar.
'SETATTR PROJECT foobar FLAG_HIDDEN 0' reveals project foobar.
--------------------------------------------------------------------------
SIZEWINDOW
WIDTH/N,HEIGHT/N
SIZEWINDOW allows to change the size of the project's first window.
--------------------------------------------------------------------------
TEXT
NEWLINE/S,TEXT/F
TEXT inserts the specified text at the current cursor position of
the project.
· NEWLINE begins a new line _before_ the text is inserted.
· TEXT specifies the text to be inserted. If the text contains
spaces, or if there are spaces at the beginning or end of the
text, you should explicitly use the keyword, because otherwise
leading and trailing spaces are stripped off by the arugment
parser.
--------------------------------------------------------------------------
UNDO
,
UNDO undoes actions of the user. UNDO can be undone by "REDO".
See also menu item 'Edit/Undo'.
--------------------------------------------------------------------------
UNLOCKGUI
,
UNLOCKGUI undoes "LOCKGUI" allowing GUI events to resume.
--------------------------------------------------------------------------
UNZOOMWINDOW
,
UNZOOMWINDOW unshrinks the project's first window (see "ZOOMWINDOW").
--------------------------------------------------------------------------
WINDOWTOBACK
,
WINDOWTOBACK moves the project's first window behind all other windows.
--------------------------------------------------------------------------
WINDOWTOFRONT
,
WINDOWTOFRONT moves the project's first window in front of all other
windows.
--------------------------------------------------------------------------
ZOOMWINDOW
,
ZOOMWINDOW makes the project's first window very small. Use
"UNZOOMWINDOW" to unshrink it again.